package com.gt.quality.system.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gt.quality.base.BaseCommonService;
import com.gt.quality.system.entity.SysDept;
import com.gt.quality.base.pojo.LayerTreeSelect;
import com.gt.quality.base.pojo.BaseLimitRequest;
import com.gt.quality.base.pojo.LayerListViewObject;

import java.util.List;

/**
 * 部门表(SysDept)表服务接口
 *
 * @author makejava
 * @since 2026-11-25 16:30:08
 */
public interface SysDeptService extends BaseCommonService<SysDept> {

    /**
     * Description:  分页查询
     *
     * @param limitRequest 分页查询参数
     * @author: makeJava
     * @date: 2026-11-25 16:30:08
     * @return:com.baomidou.mybatisplus.core.metadata.IPage
     */
    @Override
    IPage<SysDept> queryLimitPage(BaseLimitRequest<SysDept> limitRequest);


    /**
     * Description:  批量新增
     *
     * @param entityList entityList
     * @author: makeJava
     * @date: 2026-11-25 16:30:08
     * @return:Integer
     */
    @Override
    Integer saveBatchByEasyBaseMapper(List<SysDept> entityList);

    /**
     *  部门组织架构
     * @param list list
     */
    LayerListViewObject buildTreeDeptInfo(List<SysDept> list, Long userId);

    LayerListViewObject buildTree();

    /**
     * 查询当前角色的绑定关系
     * @param roleId roleId
     * @return List
     */
    List<Long> selectDeptIdsByRoleId(Long roleId);

    /**
     * 树形结构
     * @param list list
     * @param deptId deptId
     * @return LayerListViewObject
     */
    List<LayerTreeSelect> queryToTree(List<SysDept> list, Long deptId);
}


